# compiler
CC = g++

# linker
LD = g++

# compiler flags
CFLAGS = -Wno-deprecated -I.

# linker flags
LDFLAGS = -lglut -lGL -lGLU -L/usr/X11R6/lib -lX11 -lXmu -lm

# used to clean
RM = /bin/rm -f

# generated object files
OBJS = p1.o

#program file name
PROG = p1

# to compile everything
all: $(PROG)

# linking the program
$(PROG): $(OBJS)
	$(LD) $(OBJS) $(LDFLAGS) -o $(PROG)

p1.o: p1.cpp
	$(CC) $(CFLAGS) -c p1.cpp

# cleanup
clean:
	$(RM) $(PROG) $(OBJS)
